home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Periodicals / develop / develop Issues 1-3 / develop Issue 2 code / Speed Development / MDemoDialogs.cp < prev    next >
Encoding:
Text File  |  1990-02-26  |  1.4 KB  |  51 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoDialogs.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1988 - 1990 by Apple Computer, Inc. All rights reserved.
  9. ********************************************************************************/
  10.  
  11. #include <UMacApp.h>
  12. #include <UPrinting.h>
  13. #include <UGridView.h>
  14. #include <UTEView.h>
  15. #include <UDialog.h>
  16.  
  17. #ifndef __UDEMODIALOGS__
  18. #include "UDemoDialogs.h"
  19. #endif
  20.  
  21. void main()
  22. {
  23.     TTestApplication *gTestApplication;                    // The application object
  24.  
  25.     InitToolBox();                                        // Essential toolbox and utilities
  26.                                                         //    initialization
  27.     if (ValidateConfiguration(&gConfiguration)) {        // Make sure we can run
  28.  
  29.         // Continue with remainder of initialization
  30.         InitUMacApp(12);                                // Initialize MacApp; 12 calls to MoreMasters
  31.  
  32.         // ------------------------------------------------------
  33.         // If you are going to use streams for debugging IO then:
  34.         // #include <stdio.h>
  35.         // #include <iostream.h>
  36.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  37.  
  38.         // cout.sync_with_stdio();
  39.  
  40.         InitUTEView();
  41.         InitUDialog();
  42.         InitUGridView();
  43.  
  44.         gTestApplication = new TTestApplication;        // Allocate a new application object
  45.         FailNIL(gTestApplication);
  46.         gTestApplication->ITestApplication(kFileType);    // Initialize that new object
  47.         gTestApplication->Run();                        // Run the application.
  48.     } else
  49.         StdAlert(phUnsupportedConfiguration);
  50. }
  51.